<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>word文档</title>
		<link href="/css/word.css" rel="stylesheet">
	</head>

	<body class="reed">
		<div id="table">
			<div class="add">
				<form action="{{route('admin_word')}}" method="get">
					<input type="text" name="name" value="{{$name}}" placeholder="请输入公司名称" />
					<select class="select-s" name="community" id="community">
						<option value="0">请选择社区</option>
						@foreach($community as $key=>$val)
						<option value="{{$val['id']}}" @if($community_id == $val['id']) selected @endif>{{$val['name']}}</option>
						@endforeach
					</select>
					<button type="submit">搜  索</button>

					@if($data_length > 0 && (!empty($name)||$community_id!=0))
				<a class="download-s" href="{{route('admin_word_batch_download',array('name'=>$name,'community_id'=>$community_id))}}">打包下载</a>
				@endif
				</form>
				
			</div>
			<table cellpadding="0" cellspacing="0">
				<thead>
					<tr class="lirehd">
						<th>序号</th>
						<th>街道</th>
						<th>文档</th>
						<th>时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					@foreach($data as $k=>$v)
					<tr>
						<td width="5%">{{$k+1}}</td>
						<td style="text-align: left;">{{$v['area']}}</td>
						<td style="text-align: left;">{{$v['name']}}</td>
						<td width="15%">{{$v['create_time']}}</td>
						<td width="20%"><a target="_blank" href="https://view.officeapps.live.com/op/view.aspx?src=http://{{Request::server('HTTP_HOST')}}{{$v['url']}}"><span class="delete">预览</span></a><a href="{{$v['url']}}"><span class="edit">下载</span></a></td>
					</tr>
					@endforeach
				</tbody>
			</table>
			
		</div>
		
	</body>
	<script type="text/javascript" src="/js/jquery-2.1.4.min.js"></script>

</html>